home *** CD-ROM | disk | FTP | other *** search
/ Plug-In Power Pack for Netscape Communicator / Plug-In Power Pack for Netscape Communicator.iso / plugins / dataviews / dvdraw / examples / testwin / testchildwnd.h < prev    next >
Encoding:
C/C++ Source or Header  |  1997-05-19  |  2.6 KB  |  96 lines

  1. #if !defined(AFX_TESTCHILDWND_H__7D09436F_CD1E_11D0_A9D7_006097AB7F86__INCLUDED_)
  2. #define AFX_TESTCHILDWND_H__7D09436F_CD1E_11D0_A9D7_006097AB7F86__INCLUDED_
  3.  
  4. #if _MSC_VER >= 1000
  5. #pragma once
  6. #endif // _MSC_VER >= 1000
  7. // TestChildWnd.h : header file
  8. //
  9.  
  10. #include "resource.h"
  11. #include "Tfundecl.h"
  12.  
  13. /////////////////////////////////////////////////////////////////////////////
  14. // CTestChildWnd dialog
  15.  
  16. class CTestChildWnd : public CDialog
  17. {
  18. protected:
  19.   enum { NUM_UPD_RATES = 10, DEFAULT_UPD_RATE = 7 };
  20.  
  21.  
  22. // Construction
  23. public:
  24.     CTestChildWnd(UINT aid, VIEW v, char* clut, CWnd* pParent = NULL);
  25.   ~CTestChildWnd();
  26.  
  27.   void StartTest();
  28.   void StopTest();
  29.   void PauseTest();
  30.   void UpdateView();
  31.   void SetUpdateRate(int rate);
  32.   int  GetNumUpdateRates() { return NUM_UPD_RATES; }
  33.   int  GetDefaultRate() { return DEFAULT_UPD_RATE; }
  34.  
  35.   BOOL IsPaused() { return m_Paused; }
  36.  
  37. // Dialog Data
  38.     //{{AFX_DATA(CTestChildWnd)
  39.     enum { IDD = IDD_TESTWINDOW };
  40.         // NOTE: the ClassWizard will add data members here
  41.     //}}AFX_DATA
  42.  
  43.  
  44. // Overrides
  45.     // ClassWizard generated virtual function overrides
  46.     //{{AFX_VIRTUAL(CTestChildWnd)
  47.     protected:
  48.     virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
  49.     //}}AFX_VIRTUAL
  50.  
  51. protected:
  52.     CWnd*       m_pParent;
  53.     VIEW        m_View;
  54.     OBJECT      m_Screen;
  55.     OBJECT      m_Loc;
  56.     DRAWPORT    m_Drawport;
  57.     UINT        m_areaID;
  58.   char*       m_pszClut;
  59.   float*      m_pRebindArray;
  60.   int         m_NumVdps;
  61.   UINT        m_DataCounter;
  62.      UINT        m_TimerID;
  63.     UINT        m_SpeedIndex;
  64.     BOOL        m_Running;
  65.     BOOL        m_Paused;
  66.  
  67.   static UINT m_Speed[NUM_UPD_RATES];
  68.  
  69.  
  70. // Implementation
  71. protected:
  72.   void InstallTimer();
  73.   BOOL SetupLoc(const MSG* msg);
  74.   void HandleOnDraw(const MSG* msg);
  75.   void HandleMousePointerMsg(const MSG* msg);
  76.  
  77.     // Generated message map functions
  78.     //{{AFX_MSG(CTestChildWnd)
  79.     afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
  80.     afx_msg void OnDestroy();
  81.     afx_msg void OnPaint();
  82.     virtual BOOL OnInitDialog();
  83.     afx_msg void OnMouseMove(UINT nFlags, CPoint point);
  84.     afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
  85.     afx_msg void OnRButtonDown(UINT nFlags, CPoint point);
  86.     afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
  87.     afx_msg void OnRButtonUp(UINT nFlags, CPoint point);
  88.     //}}AFX_MSG
  89.     DECLARE_MESSAGE_MAP()
  90. };
  91.  
  92. //{{AFX_INSERT_LOCATION}}
  93. // Microsoft Developer Studio will insert additional declarations immediately before the previous line.
  94.  
  95. #endif // !defined(AFX_TESTCHILDWND_H__7D09436F_CD1E_11D0_A9D7_006097AB7F86__INCLUDED_)
  96.